Fix a flaky concurrent test with correct locking
authorAlex Crichton <alex@alexcrichton.com>
Mon, 15 May 2017 19:09:16 +0000 (12:09 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Mon, 15 May 2017 19:09:25 +0000 (12:09 -0700)
commit7b44acc6eb13bc9eeb812ecffc0046a115bd9bc5
tree71b35a7d4aaa855580a7dcac66621cbe6a3bf022
parent62acd6e3298a488d411f73a832a2ead75f23fe01
Fix a flaky concurrent test with correct locking

The recent refactoring to clone the bare registry left in an accidental path
where index checkouts could clobber one another. This commit updates the logic
with proper locking and attempt ordering, attempting a full retry of the open
operation after the index locked.
src/cargo/sources/registry/remote.rs